package com.smasher.net.connect

sealed class ConnectType(val value: Int) {
    object Mobile : ConnectType(0)
    object Wifi : ConnectType(1)
    object None : ConnectType(-1)

    companion object {
        fun convert2Type(value: Int): ConnectType {
            return when (value) {
                Mobile.value -> Mobile
                Wifi.value -> Wifi
                else -> None
            }
        }
    }
}